
import javax.swing.JPanel;
class paintingThread extends Thread
{
  JPanel mP;

  public paintingThread(JPanel m)
  {
    this.mP = m;
  }

  public void run()
  {
    while (true)
    {
      this.mP.repaint();
      try
      {
        sleep(20);
      }
      catch (InterruptedException ex)
      {
      }
    }
  }
}